package test;

import java.util.ArrayList;

public class StringJoiner{
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("123");
        list.add("zzz");
        list.add("qqq");

        //String a = list.remove(0);
        //System.out.println(a);

        //boolean b = list.remove("zzz");
        //System.out.println(b);

        //String c = list.get(1);
        //System.out.println(c);

        //String d = list.set(1,"zxc");
        //System.out.println(d);
        System.out.print("[");
       for(int i = 0 ; i<list.size() ;i++){
            if(i == list.size()-1){
                System.out.print(list.get(i));
            }else{
                System.out.print(list.get(i)+", ");
            }
        }
        System.out.print("]");




    }
}
